import { object_Inf } from "@/utils/typings/index.type";
import { equipDataTypeEnum } from "../index.type";

/*
 * @Descripttion:设备Dashboard-数据类型工具类
 * @LastEditors: xzh
 * @LastEditTime: 2023-11-10 10:21:31
 */
export default class EquipDataTypeListUtils {
  /**
   * @Author: xzh
   * @Descripttion: 设备数据类型列
   * @Param:
   */
  static tableColumnMap: object_Inf = {
    //设备异常数据
    [equipDataTypeEnum.equipAbnormalData]: [
      {
        field: "equipmentCode",
        //t('page.equipManageArr.equipArchivesArr.code')
        title: "page.equipManageArr.equipArchivesArr.code",
      },
      {
        field: "equipmentName",
        //t('page.equipManageArr.equipArchivesArr.name')
        title: "page.equipManageArr.equipArchivesArr.name",
      },
      {
        field: "alarmDate",
        //t('page.dashboardManageArr.equipDashboardArr.alarmDate')
        title: "page.dashboardManageArr.equipDashboardArr.alarmDate",
        formatter: "formatDate",
      },
      {
        field: "abnormalInfo",
        //t('page.dashboardManageArr.equipDashboardArr.abnormalInfo')
        title: "page.dashboardManageArr.equipDashboardArr.abnormalInfo",
      },
    ],
    //设备维修
    [equipDataTypeEnum.equipRepair]: [
      {
        field: "equipmentCode",
        //t('page.equipManageArr.equipArchivesArr.code')
        title: "page.equipManageArr.equipArchivesArr.code",
      },
      {
        field: "equipmentName",
        //t('page.equipManageArr.equipArchivesArr.name')
        title: "page.equipManageArr.equipArchivesArr.name",
      },
      {
        field: "repairCode",
        //t('page.dashboardManageArr.equipDashboardArr.repairCode')
        title: "page.dashboardManageArr.equipDashboardArr.repairCode",
      },
      {
        field: "repairManager",
        //t('page.dashboardManageArr.equipDashboardArr.repairManager')
        title: "page.dashboardManageArr.equipDashboardArr.repairManager",
      },
      {
        field: "repairSatrtDate",
        //t('page.dashboardManageArr.equipDashboardArr.repairSatrtDate')
        title: "page.dashboardManageArr.equipDashboardArr.repairSatrtDate",
        formatter: "formatDateTime",
      },
      {
        field: "repairEndDate",
        //t('page.dashboardManageArr.equipDashboardArr.repairEndDate')
        title: "page.dashboardManageArr.equipDashboardArr.repairEndDate",
        formatter: "formatDateTime",
      },
      {
        field: "repairInfo",
        //t('page.dashboardManageArr.equipDashboardArr.repairInfo')
        title: "page.dashboardManageArr.equipDashboardArr.repairInfo",
        formatter: "formatDateTime",
      },
    ],
    //设备保养记录
    [equipDataTypeEnum.equipUpkeepRecord]: [
      {
        field: "equipmentCode",
        //t('page.equipManageArr.equipArchivesArr.code')
        title: "page.equipManageArr.equipArchivesArr.code",
      },
      {
        field: "equipmentName",
        //t('page.equipManageArr.equipArchivesArr.name')
        title: "page.equipManageArr.equipArchivesArr.name",
      },
      {
        field: "maintenanceCode",
        //t('page.dashboardManageArr.equipDashboardArr.upkeepCode')
        title: "page.dashboardManageArr.equipDashboardArr.upkeepCode",
      },
      {
        field: "maintenanceManger",
        //t('page.equipUpkeepArr.upkeepPlanArr.manager')
        title: "page.equipUpkeepArr.upkeepPlanArr.manager",
      },
      {
        field: "startDate",
        //t('page.equipUpkeepArr.upkeepPlanArr.startDate')
        title: "page.equipUpkeepArr.upkeepPlanArr.startDate",
        formatter: "formatDateTime",
      },
      {
        field: "endDate",
        //t('page.equipUpkeepArr.upkeepPlanArr.endDate')
        title: "page.equipUpkeepArr.upkeepPlanArr.endDate",
        formatter: "formatDateTime",
      },
      {
        field: "maintenanceInfo",
        //t('page.moldUpkeepArr.upkeepContent')
        title: "page.moldUpkeepArr.upkeepContent",
      },
    ],
    //设备保养计划
    [equipDataTypeEnum.equipUpkeepPlan]: [
      {
        field: "equipmentCode",
        //t('page.equipManageArr.equipArchivesArr.code')
        title: "page.equipManageArr.equipArchivesArr.code",
      },
      {
        field: "equipmentName",
        //t('page.equipManageArr.equipArchivesArr.name')
        title: "page.equipManageArr.equipArchivesArr.name",
      },
      {
        field: "planCode",
        //t('page.dashboardManageArr.moldDashboardArr.upkeepPlanCode')
        title: "page.dashboardManageArr.moldDashboardArr.upkeepPlanCode",
      },
      {
        field: "maintenanceManger",
        //t('page.equipUpkeepArr.upkeepPlanArr.manager')
        title: "page.equipUpkeepArr.upkeepPlanArr.manager",
      },
      {
        field: "startDate",
        //t('page.equipUpkeepArr.upkeepPlanArr.startDate')
        title: "page.equipUpkeepArr.upkeepPlanArr.startDate",
        formatter: "formatDateTime",
      },
      {
        field: "endDate",
        //t('page.equipUpkeepArr.upkeepPlanArr.endDate')
        title: "page.equipUpkeepArr.upkeepPlanArr.endDate",
        formatter: "formatDateTime",
      },
      {
        field: "planInfo",
        //t('page.moldUpkeepArr.upkeepContent')
        title: "page.moldUpkeepArr.upkeepContent",
      },
    ],
  };
}
